qemu-ppce500: pass 'range_id' around in pci_map_region
authorMiao Yan <[email protected]>
Mon, 21 Dec 2015 09:19:59 +0000 (01:19 -0800)
committerTom Rini <[email protected]>
Mon, 4 Jan 2016 17:25:34 +0000 (12:25 -0500)
In pci_map_region(), pass 'range_id' to fdt_read_range(),
otherwise the same address will be mapped again in other
calls to pci_map_region()

Signed-off-by: Miao Yan <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Alexander Graf <[email protected]>
board/freescale/qemu-ppce500/qemu-ppce500.c

index a0fca0d88083105e07a71cb4cccd23ed0751f325..6cb5692eda6e9a368a4d7a2882887971edb5aed3 100644 (file)
@@ -81,7 +81,7 @@ static int pci_map_region(void *fdt, int pci_node, int range_id,
        ulong map_addr;
        int r;
 
-       r = fdt_read_range(fdt, pci_node, 0, NULL, &addr, &size);
+       r = fdt_read_range(fdt, pci_node, range_id, NULL, &addr, &size);
        if (r)
                return r;